<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0055)http://piao.mtime.com/onlineticket/8197_382301591/seat/ -->
<html xmlns="http://www.w3.org/1999/xhtml" id="htmlTag">
<head id="head">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>城市猎人影院选座购票</title>
    <meta name="keywords" content="城市猎人影院选座购票">
    <meta name="description" content="城市猎人影院选座购票">
    <link href="../static/css/publicpack2014.css" rel="stylesheet" type="text/css">
    <link href="../static/css/ticket.css" rel="stylesheet" type="text/css">
    <link href="../static/css/ticket_replace.css" rel="stylesheet" type="text/css">
<!--     <script id="__core_0" type="text/javascript" charset="utf-8" src="../static/util/Manager.msi.下载"
            async="true"></script>
    <script id="__core_1" type="text/javascript" charset="utf-8" src="../static/js/SelectSeat.js"
            async="true"></script>
    <script id="__core_2" type="text/javascript" charset="utf-8" src="../static/js/ga.js"
            async="true"></script>
    <script id="__core_3" type="text/javascript" charset="utf-8" src="../static/js/h.js"
            async="true"></script>
    <script id="__core_4" type="text/javascript" charset="utf-8"
            src="./BuyTicket/js/OnlineTicketSelectSeatPage2012.js" async="true"></script>
    <script id="__core_5" type="text/javascript" charset="utf-8"
            src="./BuyTicket/js/AutoSpaceInput.js" async="true"></script>
    <script src="./BuyTicket/js/mtime-vip.js"></script>
    <script id="__core_6" type="text/javascript" charset="utf-8" src="./BuyTicket/util/Trade.p"
            async="true"></script>
    <script id="__core_7" type="text/javascript" charset="utf-8" src="./BuyTicket/util/Message.msi.下载"
            async="true"></script>
    <script id="__core_8" type="text/javascript" charset="utf-8" src="./BuyTicket/util/download-app"
            async="true"></script>
    <script type="text/javascript" charset="utf-8" async=""
            src="./BuyTicket/js/chunk-0-98198ebd.js"></script> -->
    <link rel="stylesheet" href="../static/css/mtime-vip.css">
    <style type="text/css">
.LeftContentRegion{width:700px; margin:40px auto 0 auto; min-height:450px;} 
@media screen and (max-width: 360px) {.LeftContentRegion {width:340px}} 
 .front{width: 300px;margin: 5px 32px 45px 32px;background-color: #f0f0f0;	color: #666;text-align: center;padding: 3px;border-radius: 5px;}
.booking-details {float: right;position: relative;width:200px;height: 450px; }
.booking-details h3 {margin: 5px 5px 0 0;font-size: 16px;}
.booking-details p{line-height:26px; font-size:16px; color:#999}
.booking-details p span{color:#666} 
div.seatCharts-cell {color: #182C4E;height: 25px;width: 25px;line-height: 25px;margin: 3px;float: left;text-align: center;outline: none;font-size: 13px;}
div.seatCharts-seat {color: #fff;cursor: pointer;-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;}
div.seatCharts-row { display:table; height: 35px; margin-left: auto; margin-right: auto; }  
div.seatCharts-seat.available {background-color: #B9DEA0 ;}
div.seatCharts-seat.focused {background-color: #76B474;border: none;}
div.seatCharts-seat.selected {background-color: #E6CAC4;}
div.seatCharts-seat.unavailable {background-color: #472B34;cursor: not-allowed; float: left;}
div.seatCharts-container {width: 570px ; margin:0 auto;}        /* 座位的样式 {width: 400px;margin : auto;} */
div.seatCharts-legend {padding-left: 0px;position: absolute;bottom: 16px;} 
ul.seatCharts-legendList {padding-left: 0px;} 
.seatCharts-legendItem{float:left; width:90px;margin-top: 10px;line-height: 2;} 
span.seatCharts-legendDescription {margin-left: 5px;line-height: 30px;} 
.checkout-button {display: block;width:80px; height:24px; line-height:20px;margin: 10px auto;border:1px solid #999;font-size: 14px; cursor:pointer} 
#selected-seats {max-height: 150px;overflow-y: auto;overflow-x: none;width: 200px;} 
#selected-seats li{float:left; width:72px; height:26px; line-height:26px; border:1px solid #d3d3d3; background:#f7f7f7; margin:6px; font-size:14px; font-weight:bold; text-align:center}
.p20 tc {margin-top : 200px;}

</style>
</head>
<body pn="SelectSeatPage">

<!-- <script type="text/javascript" src="./深圳 中影UL城市影院（黄田店） 选座购票_files/saved_resource"></script> -->
<div id="topbar" pn="M16_HeadNav">

	<div page="123.html" id="frist">
		</div>

</div>
<div id="managerHistoryRegion"></div>
<!--缩略图容器-->
<div class="tickbox" id="seatThumbnail" style="left: 151.5px;"></div><!--cont -->
<div class="ticket_cont clearfix"> <!--left -->
    <div id="LeftContentRegion">
        <div  class="ticket_left">
        	<div >
             <div class="seat_screen"> 城市猎人影院&nbsp; <p id="enableSeatCoutRegion"></p></div>
            
             <div ><br /></div>
             <div id="seat-map"></div>
             
            </div>
            <!--seatlist -->
            <div class="p_r" id="seatContainer">
                <table cellspacing="0" cellpadding="0" class="seat_num" align="center">
                    <tbody>
                   <!--  <tr>
                        <td width="30" class="row_nums">1排</td>
                    </tr>
                    <tr>
                        <td width="30" class="row_nums">2排</td>
                    </tr>
                    <tr>
                        <td width="30" class="row_nums">3排</td>
                    </tr>
                    <tr>
                        <td width="30" class="row_nums">4排</td>
                    </tr>
                    <tr>
                        <td width="30" class="row_nums">5排</td>
                    </tr>
                    <tr>
                        <td width="30" class="row_nums">6排</td>
                    </tr>
                    <tr>
                        <td width="30" class="row_nums">7排</td>
                    </tr> -->
                    </tbody>
                </table>
                <div id="drawSeat" class="seat_selectout">
                    <table id="tbSeat" cellspacing="0" cellpadding="0" class="seat_views" align="center">
                        <tbody>
                       <!--  <tr>
                            <td id="tbSeatTD" align="center"> <i class="seat_ture" id="seat_0_0" rowname="1"
                                                                colname="1排12座" status="0" type="0">&nbsp;</i><i
                                    class="seat_ture" id="seat_0_1" rowname="1" colname="1排11座" status="0" type="0">&nbsp;</i><i
                                    class="seat_ture" id="seat_0_2" rowname="1" colname="1排10座" status="0" type="0">&nbsp;</i><i
                                    class="seat_ture" id="seat_0_3" rowname="1" colname="1排09座" status="0" type="0">&nbsp;</i><i
                                    class="seat_ture" id="seat_0_4" rowname="1" colname="1排08座" status="0" type="0">&nbsp;</i><i
                                    class="seat_ture" id="seat_0_5" rowname="1" colname="1排07座" status="0" type="0">&nbsp;</i><i
                                    class="seat_ture" id="seat_0_6" rowname="1" colname="1排06座" status="0" type="0">&nbsp;</i><i
                                    class="seat_ture" id="seat_0_7" rowname="1" colname="1排05座" status="0" type="0">&nbsp;</i><i
                                    class="seat_ture" id="seat_0_8" rowname="1" colname="1排04座" status="0" type="0">&nbsp;</i><i
                                    class="seat_ture" id="seat_0_9" rowname="1" colname="1排03座" status="0" type="0">&nbsp;</i><i
                                    class="seat_ture" id="seat_0_10" rowname="1" colname="1排02座" status="0" type="0">&nbsp;</i><i
                                    class="seat_ture" id="seat_0_11" rowname="1" colname="1排01座" status="0" type="0">&nbsp;</i> 
                                <p id="columnLine" class="line-v">&nbsp;</p>
                                <p id="rowLine" class="line-h">&nbsp;</p></td>
                        </tr> -->
                      
                        </tbody>
                    </table>
                </div>
            </div> <!--seatlist -->
            <div class="p20 tc"><span class="inblock mlr15"><i class="seat_ture v_m mr3"></i>可选座位</span> <span
                    class="inblock mlr15"> <i class="seat_selected v_m mr3"></i>已选座位</span> <span class="inblock mlr15"><i
                    class="seat_false v_m mr3"> </i>不可选座位</span> <span class="inblock mlr15"><i
                    class="seat_lover v_m mr3"></i>情侣座位</span></div>
            <p id="selectSeatPointOut" class="c_orange mt5 pl60 tl"></p> <!--优惠套餐 Begin-->  <!--优惠套餐 End--> </div>
    </div> <!--left end --> <!--right -->
    <div class="ticket_right" style="background:none;"><h2 class="tickettitle">电影票</h2>
        <dl class="new_ticket_pic fix mt20">
            <dt><img id="movieimg" width="60" alt="" src="" ></dt>
            <dd><h2 class="px16" id="movieName"></h2>
                <p id="movieType" class="mt9">类型：喜剧</p></dd>
        </dl>  <!--新的 开始-->
        <div><p class="mt12">影院：<strong class="c_000 px14 ml10" style="padding-left:2px;">城市猎人影院</strong></p>
            <p class="mt12">影厅：<strong class="c_000 px14 ml10" id="hall">2D&nbsp;中文版</strong></p>
            <div style="z-index:3;" class="mt12 clearfix p_r"><span class="fl">场次：<strong id="showTime" class="c_000 px14 ml10">8月9日&nbsp;&nbsp;22:00</strong></span>
                <div style="width:60px; margin-top:-2px; *margin-top:-3px; " class="fl ml15 p_r" id="btnShowMore"
                     data-selector="m"><em class="cur_p">更换<span id="MoreShowtimeICON"
                                                                 class="ticket_changenone">▼</span>
                    <!--ticket_changenone --></em></div>
            </div>
            <div class="ticket_changelist mt9" id="MoreShowtimeRegion" style="display:none;">
                <div><p class="mb3"><a href="http://piao.mtime.com/onlineticket/showtime/1848844034/">22:00</a> |<a
                        href="http://piao.mtime.com/onlineticket/showtime/1848844022/">23:00</a></p></div>
            </div>
            <div class="clearfix mt12"><span class="fl">座位：</span>
                <!-- <div class="fl seat_numbox seat_numbox_false ml10" id="SelectedSeatRegion"></div> -->
                <ul id="selected-seats"></ul>
            </div>
            <p class="mt12">票价：<strong class="c_000 px14 ml10"><span id="unitprice"></span>元/张</strong></p>
            <p class="mt12">票数：<strong class="c_000 px14 ml10" id="counter">0</strong></p>
            <!--选中优惠套餐显示部分 Begin--> <h2 class="tickettitle mt35" style="display:none;">优惠套餐</h2>
            <ul class="pacepic" id="selectedCommodityRegion" style="display:none;"></ul> <!--选中优惠套餐显示部分 End--> <p
                    class="line_solid mt20">&nbsp;</p>
            <p class="mt12">总计：<strong class="px24 ml10 c_orange" id="total">￥0</strong></p>
            <p class="mt20">接收兑换码手机号：</p>
            <div class="mt12">
                <div class="p_r newtxt"><input id="phoneText" type="text" class="ticket_txt" value=""
                                               maxlength="13">
                    <p id="phoneTextError" class="px12 c_red pt3"
                       style="position:absolute;top:9px;right:62px;display:none;"></p></div>
                <div class="mt12">
                    <div id="VcodeRegion" style="display:none;" class="p_r newtxt"><input id="vcodeText" type="text"
                                                                                          maxlength="4"
                                                                                          class="ticket_txt c_a5"
                                                                                          value="请输入验证码">
                        <div id="vcodeContentRegion" style="display:none;" class="mt10 px12"><span class="vm"><img
                                id="vcodeImage" vcodeid="" width="123" height="62"></span> <a id="vcodeRefresh"
                                                                                              href="http://piao.mtime.com/onlineticket/8197_382301591/seat/#"
                                                                                              class="ml12"
                                                                                              onclick="return false;">刷新</a>
                        </div>
                        <p id="vcodeTextError" class="px12 pt3 c_red pb6"
                           style="visibility:visible; position:absolute;top:10px;right:62px;display:none;"></p></div>
                    <p class="mt9"><input id="submitSeat" type="button" value="下一步" class="btn_orange6 new_btn_orange"
                                          style="margin-right:-1px;"> <span id="reSelectCount"
                                                                            style="display:none;"></span></p>
                    <div class="mt35 yahei c_7f7"><strong class="c_78"></strong>
                        <!-- <p class="mt6">本场座位图及票务信息由中影UL城市影院（黄田店）提供;</p> --></div>
                </div>
            </div>
        </div> <!--新的 结束--> </div> <!--right end --></div>
<a id="udesk-im-61" href="javascript:;" title="联系客服" pan="SelectSeatPage_Udesk_Im">联系客服</a>
<script type="text/javascript"> var mtimeserverbox = document.getElementById('udesk-im-61');
mtimeserverbox.onclick = function () {
    window.open("http://www.mtime.udesk.cn/im_client?cur_url=" + encodeURIComponent(location.href) + "&pre_url=" + encodeURIComponent(document.referrer), "udesk_im", "width=780,height=560,top=200,left=350,resizable=yes");
};</script>
<div id="contentEnd">
    <embed type="application/x-shockwave-flash"
           src="http://static1.mtime.cn/20180730161010/flash/MtimeCallback.swf?rnd=461245445" width="1" height="1"
           id="flashCallback" name="flashCallback" quality="high" menu="false" allowfullscreen="false"
           allowscriptaccess="always" wmode="transparent">
</div>
<div id="bottom">
    <div class="footout"><span class="topline"></span>
        <div class="footinner clearfix">
            <div class="fotlogo">
                <dl>
                    <dt><a href="http://www.mtime.com/" title="Mtime时光网">Mtime时光网</a></dt>
                    <dd class="clearfix"><a href="https://app.mokahr.com/apply/mtime">加入我们</a><a
                            href="http://feature.mtime.com/help/contact.htm" class="ml30">联系我们</a></dd>
                    <dd class="clearfix"><a href="http://group.mtime.com/help/">站务论坛</a><a
                            href="http://my.mtime.com/reportError/" class="ml30">问题反馈</a></dd>
                    <dd class="clearfix"><a href="http://feature.mtime.com/help/rules.htm">社区准则</a><a
                            href="http://www.mtime.com/sitemap.htm" class="ml30">网站地图</a></dd>
                    <dd class="clearfix"><a href="http://feature.mtime.com/help/privacy.htm">隐私政策</a><a
                            href="http://en.mtime.com/" class="ml30">English</a></dd>
                </dl>
                <i class="line"></i></div>
            <div class="fotmap">
                <dl style="width:42px;">
                    <dt>栏目</dt>
                    <dd><a href="http://news.mtime.com/">新闻</a></dd>
                    <dd><a href="http://theater.mtime.com/">影院</a></dd>
                    <dd><a href="http://mall.mtime.com/">商城</a></dd>
                    <dd><a href="http://www.mtime.com/community/">社区</a></dd>
                </dl>
                <dl style="width:185px;">
                    <dt>推荐</dt>
                    <dd><a href="http://movie.mtime.com/recent/">观影指南</a><a href="http://movie.mtime.com/boxoffice/"
                                                                            class="ml30">电影票房</a></dd>
                    <dd><a href="http://news.mtime.com/conversation/">时光对话</a><a href="http://video.mtime.com/trailer/"
                                                                                 class="ml30">新片预告</a></dd>
                    <dd><a href="http://movie.mtime.com/all/list/index.html">特色榜单</a><a
                            href="http://my.mtime.com/app/quiz/" class="ml30">电影猜猜猜</a></dd>
                    <dd><a href="http://news.mtime.com/fun/">全球拾趣</a><a href="http://my.mtime.com/app/card/"
                                                                        class="ml30">卡片大富翁</a></dd>
                </dl>
                <dl>
                    <dt>关注我们</dt>
                    <dd><a href="http://weibo.com/movietime?topnav=1&amp;wvr=5&amp;topsug=1" target="_blank"
                           class="sina" title="新浪">新浪</a></dd>
                    <dd><a id="aWeiXinPicButton" href="javascript:void(0)" class="weixin" title="微信">微信</a></dd>
                    <dd><a href="http://www.mtime.com/rss/" target="_blank" class="rss" title="RSS">RSS</a></dd>
                </dl>
                <i class="line"></i>
                <div id="divWeiXinPicContainer" class="my_layer" style="display: none;"><em class="l_arrow">&nbsp;</em>
                    <div class="inner p15" style="width:195px;"><i></i>
                        <p>扫描二维码，微信实时关注时光网</p></div>
                </div>
            </div>
            <div class="fotweek">
                <dl>
                    <dt class="clearfix"><span class="fr">第212期</span><strong>时光周刊</strong></dt>
                    <dd><a href="http://www.mtime.com/weekly/" target="_blank" title="时光周刊"><img
                            src="./BuyTicket/img/155934.32319019.jpg" width="170" alt="时光周刊"></a></dd>
                    <dd class="input"><input id="iptEMail" type="text" value="邮箱地址" class="c_a5"><a id="btnSubscribe"
                                                                                                    href="javascript:void(0)">订阅</a>
                    </dd>
                </dl>
            </div>
            <div class="fothr">
                <dl>
                    <dt><strong>手机购票</strong> 方便 实惠</dt>
                    <dd><a href="http://feature.mtime.com/mobile/" target="_blank"><i></i></a></dd>
                    <dd>扫描二维码 下载客户端</dd>
                </dl>
            </div>
        </div>
    </div>
    <div class="db_foot"><p><span class="mr12">北京动艺时光网络科技有限公司</span>Copyright 2006-2018 Mtime.com Inc. All rights
        reserved.<br><a href="http://feature.mtime.com/help/icp.htm" target="_blank" class="mr12 ml12">京ICP证050715号</a>
        <a href="http://feature.mtime.com/help/videolicence.htm" target="_blank" class="mr12">网络视听许可证0108265号</a><a
                href="http://feature.mtime.com/help/network.htm" target="_blank" class="mr12">网络文化经营许可证</a><a
                href="http://feature.mtime.com/help/tvlicence.htm" target="_blank"
                class="mr12">广播电视节目制作经营许可证(京)字第1435号</a><span>京公网安备：110105000744号</span></p>
        <div class="credible"><a href="http://feature.mtime.com/help/credible.htm" target="_blank" title="可信网站"
                                 class="credibler"></a><a href="http://feature.mtime.com/help/goodfaith.htm"
                                                          target="_blank" title="诚信网站" class="goodfaith"></a></div>
    </div>
 
</div>

<script type="text/javascript" src="../static/js/jquery-3.3.1.js"></script>
<script type="text/javascript" src="../static/js/jquery.seat-charts.min.js"></script>
<script type="text/javascript" src="../static/js/common.js"></script>
<script type="text/javascript" src="../static/js/layer/layer.js"></script>
<script type="text/javascript" src="../static/js/test.js" ></script>

<script type="text/javascript">

var price =0; //票价
var userId=0;
var scheduleId=0;
$(document).ready(function() {
	getScheduleData();   //进入页面就渲染排片信息
	selectSeatMax();     //进入页面就渲染座位模板与已订座位
	getPhone();
	frist(); 	 		 //首栏
});

function getPhone(){ //判断用户是否已经登录 如果已登录直接渲染手机号码
	$.ajax({
		url:"/moviesMaven/getLoginUser.htm",
		dataType:"json",
		success:function(data){
			if(data.success){
				userId=data.result.id;
				$("#phoneText").val(data.result.userName);
			}
		},
		error:function(){
			layer.msg("后台出错，请联系管理员！");
		}

	});

}

function getScheduleData(){  //获取排片信息  
	scheduleId = getUrlParam('scheduleId');  //引用 test.js 方法
	
	
	$.ajax({
            url:"/moviesMaven/schedule/getScheduleByscheduleId.htm",
            dataType:"json",
            data:{"scheduleId":scheduleId},
            success:function (data) {
            	setData(data.result); 
                		  
                },
             error:function () {
                   layer.msg("查询出错,请联系管理员");
             }
            }); 

}
function setData(data){ //渲染页面
	$("#movieimg").attr("alt", data.movie.movieName); 
	$("#movieimg").attr("src", data.movie.poster);
	$("#movieType").text("类型："+data.movieTypeName+"");
	$("#movieName").text(data.movie.movieName);
	$("#showTime").text(data.showTime.substring(0,data.showTime.lastIndexOf(':')));
	$("#hall").text(data.hall.description);
	price=data.price;
	$("#unitprice").text(price);
}


//返回座位模板与已订座位数组
function selectSeatMax() {
	
	 $.ajax({
            url:"/moviesMaven/html/seat/getRowLineMax.htm",
            dataType:"json",
            data:"scheduleId="+scheduleId+"",
            success:function (data) {
            	
            	showSeat(data.result,data.result2);
		  
                },
            error:function () {
                	layer.msg("查询出错,请联系管理员");
            }
            }); 
 
	 
}

function showSeat(seats,picNum){

	var $cart = $('#selected-seats'), //座位区
	$counter = $('#counter'), //票数
	$total = $('#total'); //总计金额
	
	var sc = $('#seat-map').seatCharts({
	
		map: seats,
		/* [  //座位图
		     

			'aaaaaaaaaa',
            'aaaaaaaaaa',
            '__________',
            'aaaaaaaa__',
            'aaaaaaaaaa',
			'aaaaaaaaaa',
			'aaaaaaaaaa',
			'aaaaaaaaaa',
			'aaaaaaaaaa',
            'aa__aa__aa'
		], */
		naming : {
			top : false,
			getLabel : function (character, row, column) {
				return column;
			}
		},
		legend : { //定义图例
			node : $('#legend'),
			items : [
				[ 'a', 'available',   '可选座' ],
				[ 'a', 'unavailable', '已售出']
			]					
		},
		click: function () { //点击事件
			if (this.status() == 'available') { //可选座
				var num =$counter.text();
				if(num==4){
					layer.msg("一个订单最大只能订4个座位！");
					return 'available';
				}else{
				$('<li>'+(this.settings.row+1)+'排'+this.settings.label+'座</li>')
				.attr('id', 'cart-item-'+this.settings.id)
				.data('seatId', this.settings.id)
				.appendTo($cart);

				$counter.text(sc.find('selected').length+1);
				$total.text(recalculateTotal(sc)+price);
							
				return 'selected';
					
				}
				
			} else if (this.status() == 'selected') { //已选中
					//更新数量
					$counter.text(sc.find('selected').length-1);
					//更新总计
					$total.text(recalculateTotal(sc)-price);
						
					//删除已预订座位
					$('#cart-item-'+this.settings.id).remove();
					//可选座
					return 'available';
			} else if (this.status() == 'unavailable') { //已售出
				return 'unavailable';
			} else {
				return this.style();
			}
		}
	});
	
	//已售出的座位
    sc.get(picNum).status('unavailable'); 

}


	//当点击购买
	$("#submitSeat").click(function () {
		
		if($("#selected-seats").find('li').length==0){ //判断是否已选座位
			layer.msg("请先选择座位！！！");
			return false;
		}else{
			getSessionUser(); //调用方法判断用户是否登录
		}

		
		
	});
//判断用户是否已经登录
function getSessionUser(){
	if(userId > 0){
		buy();
	}else {
		$.ajax({
			url:"/moviesMaven/getLoginUser.htm",
			dataType:"json",
			success:function(data){
				if(data.success){
					userId=data.result.id;
					buy();
				}else{
					layer.open({
						title:"提示",
						icon:7,
						content: "请先登录，再进行购票！",
						btn: ['确定'],
						yes:function(){
							location.href = "/moviesMaven/html/login.html";
						},
						cancel:function(){
							location.href = "/moviesMaven/html/login.html";
						}
					 });
					
				}
			},
			error:function(){
				layer.msg("后台出错，请联系管理员！");
			}

		});
	}
	
}

function buy(){  //进入购票环节
	var index = layer.load(); //锁定页面
	var seats = new Array();  //储存选择座位位置的模板
   	$("#selected-seats li").each(function (i) { //循环获取选择的座位位置
		var str = $(this).attr("id");
		string = str.substring(10,14); //截取座位位置模板
        seats.push(string);   //循环添加到数组
    });
	 	
	var count =$("#counter").text();  //储存票数
	var total =$("#total").text();    //储存总价
	var map={};
	map.scheduleId=scheduleId;
	map.userId=userId;
	map.seats=seats;
	map.count=count;
	map.total=total;
	map.userPhone=$("#phoneText").val();
	var str="";
	str = JSON.stringify(map); //主要： map转json字符串放入data
	
	var movieName = $("#movieName").text(); //获取电影名
	var showTime = $("#showTime").text(); //获取放映时间
	layer.open({
		title:"确认",
		icon:3,
		content: "您即将预定"+map.count+"张《"+movieName+"》，总价："+map.total+"元。放映时间为 : "+showTime+"。付款后将不支持退票！ ",
		btn: ['确定','取消'],
		yes:function(){
			
			 $.ajax({   //查询座位是否已订
					url:"/moviesMaven/order/getOrderSeatBySchedule.htm",
					type:'post',
					dataType:"json",
					data:{"param":str},
					success:function (data) {
						layer.close(index);   //解除页面
						if(data.success){
							layer.msg('预定成功，即将跳转支付页面', {
								  icon: 1,
								  time: 2000 //2秒关闭（如果不配置，默认是3秒）
								}, function(){
									  window.location.href = "/moviesMaven/alipay/index.jsp?count="+count+"&movieName="+movieName+"&price="+total+"&orderId="+data.result;   
									
								}); 
						}else{
							layer.msg(data.message, {
								  icon: 1,
								  time: 2000 //2秒关闭（如果不配置，默认是3秒）
								}, function(){
									window.location.reload();
									
								}); 
	
						}
					},
					error:function(){
						layer.close(index); //解除页面
						layer.msg("订票出错,请联系管理员");
						
					}
				}); 
			
		},
		btn2: function(){
			layer.close(index); //解除页面
		 },
		cancel:function(){
			layer.close(index); //解除页面
		}
	});
	
	
}
	


//计算总金额
function recalculateTotal(sc) {
	var total = 0;
	sc.find('selected').each(function () {
		total += price;
	});
			
	return total;
}

//首栏
function frist(){
	var liftPage = $("#frist").attr("page");
	$("#frist").load(liftPage);
};
</script>


</body>
</html>